home *** CD-ROM | disk | FTP | other *** search
/ MacHome 2001 January / MacHome Magazine Demo Disc January 2001.iso / mac / Software / Networking / InterMapper 3.0 - PPC.sea / InterMapper 3.0 - PPC / InterMapper™ 3.0-PPC / InterMapper™ 3.0-PPC.rsrc / PrTy_147_com.dartware.tcp.dnd < prev    next >
Encoding:
Text File  |  2000-07-24  |  1.6 KB  |  72 lines

  1. <!-- 
  2.     DND Protocol (com.dartware.tcp.dnd)
  3.     Copyright © 2000 Dartware, LLC. All rights reserved.
  4. -->
  5.  
  6. <header>
  7.     type            =     "tcp-script"
  8.     package            =     "com.dartware"
  9.     probe_name        =    "tcp.dnd"
  10.     human_name        =    "DND Protocol"
  11.     version            =     "1.1"
  12.     address_type    =     "IP"
  13.     port_number        =    "902"
  14. </header>
  15.  
  16. <description>
  17.  
  18. ≤GB≥DND Protocol≤P≥
  19.  
  20. The protocol used to lookup directory entries and validation information in a DND server. The DND is a centralized authentication/directory service developed at Dartmouth College. The default TCP port number for DND connections is port 902.
  21.  
  22. ≤i≥Name≤p≥ is the name to look up in the DND.
  23.  
  24. </description>
  25.  
  26. <parameters>
  27.  
  28. "Name"        =    "Joe Hill"
  29.  
  30. </parameters>
  31.  
  32. <script>
  33.  
  34. CONN #60 (connect timeout in secs)
  35. WAIT #30 @IDLE (idle timeout in secs)
  36. MTCH "220" else goto @UNEXPECTED_GREETING
  37. EXPT "220 " else goto @DISCONNECT
  38.  
  39. SEND "LOOKUP ${Name},EMAIL\r\n"
  40. MTCH m"101 #+ 1" else goto @UNEXPECTED_LOOKUP_RESULT
  41. NEXT
  42. SKIP m"110 .+" else goto @DISCONNECT
  43. MTCH m"20[01]" else goto @UNEXPECTED_LOOKUP_RESULT
  44.  
  45. SEND "QUIT\r\n"
  46. MTCH "200" #+2
  47. EXPT "200 " #+1
  48. DONE OKAY
  49.  
  50.  
  51. @UNEXPECTED_GREETING:
  52. STAT DOWN "[DND] Unexpected greeting from port ${_REMOTEPORT}. (${_LINE:50})"
  53. SEND "QUIT\r\n"
  54. MTCH "200" #+2
  55. EXPT "200 " #+1
  56. EXIT
  57.  
  58. @UNEXPECTED_LOOKUP_RESULT:
  59. STAT ALRM "[DND] Unexpected response to LOOKUP command. (${_LINE:50})"
  60. SEND "QUIT\r\n"
  61. MTCH "200" #+2
  62. EXPT "200 " #+1
  63. EXIT
  64.  
  65. @IDLE:
  66. DONE DOWN "[DND] No data for ${_IDLETIMEOUT} seconds.  Was expecting \"${_STRINGTOMATCH}\". [Line ${_IDLELINE}]"
  67.  
  68. @DISCONNECT:
  69. DONE DOWN "[DND] Connection disconnected while expecting \"${_STRINGTOMATCH}\"."
  70.  
  71. </script>
  72.